﻿namespace Borg.AddOn
{
    internal sealed class CompositionEngineApiHookChain : ICompositionEngineApiHook
    {
        private readonly ICompositionEngineApiHook[] _hooks;

        public CompositionEngineApiHookChain(ICompositionEngineApiHook[] hooks)
        {
            _hooks = hooks;
        }

        public void OnSetProperty(CompositionEngineOperation operation)
        {
            foreach (ICompositionEngineApiHook hook in _hooks)
                hook.OnSetProperty(operation);
        }
    }
}
